import service from '@/utils/request'

// 获取月卡信息
/**
 *
 * @returns 返回所有的月卡信息
 */
export const getCarInfo = (params) => {
  return service({
    url: '/parking/card/list',
    params
  })
}

// 搜索月卡信息
export const searchParkList = (params) => {
  return service({
    url: '/parking/card/list',
    params
  })
}

// 添加月卡
export const addParkInfoApi = (data) => {
  return service({
    method: 'post',
    url: '/parking/card',
    data
  })
}

// 获取单个月卡信息  /parking/card/{Id}
export const singlePackInfo = (id) => {
  return service({
    url: `/parking/card/${id}`
  })
}

// 编辑月卡 /parking/card/edit
export const singleEditPackInfo = (data) => {
  return service({
    method: 'put',
    url: '/parking/card/edit',
    data
  })
}

// 删除月卡 /parking/card/{ids}
export const delPackInfo = (ids) => {
  return service({
    method: 'delete',
    url: `/parking/card/${ids}`
  })
}

// 计费列表 https://api-hmzs.itheima.net/api/parking/rule/list
export const getCarInfoApi = (params) => {
  return service({
    url: `/parking/rule/list`,
    params
  })
}
